body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    font-family: Arial, sans-serif;
}

.container-box {
    display: flex;
}

/* 这是左侧 */
.sidebar-box-left {
    display: flex;
    min-height: 100vh;
    background-color: #f5f5f5;
    position: fixed;
}

/* 这是右侧 */
.sidebar-box-right {
    flex: 1;
    margin-left: 200px;
    min-height: 100vh
}

/* 下面是行首导航 */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 2rem 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

#user-center {
    display: none;
}

.sidebar-header a {
    font-size: 1.3rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}


.sidebar-header a::before {
    content: "👤";
    margin-right: 10px;
    font-size: 1.1rem;
}


.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    padding: 0.8rem 1.5rem;
    margin: 0.3rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.sidebar-nav li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: white;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-nav li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav li:hover::before {
    transform: scaleY(1);
}

.sidebar-nav li.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.sidebar-nav li.active::before {
    transform: scaleY(1);
}

.sidebar-nav li::after {
    content: "→";
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-nav li:hover::after {
    opacity: 1;
}

.main-content {
    flex: 1;
    padding: 2rem;
}

/* 下面是内容 */

header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: white;
    color: #6e8efb;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-title {
    text-align: center;
    margin: 3rem 0;
    font-size: 2rem;
    font-weight: 300;
    position: relative;
}

.section-title:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #6e8efb, #a777e3);
    margin: 1rem auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    /* grid-template-columns: repeat(4, 1fr); */
    gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    cursor: pointer;
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-img {
    height: 250px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #444;
}

.card-desc {
    height: 50px;
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    overflow: hidden;
    /* 超出隐藏 */
}

.card-link {
    color: #6e8efb;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.card-link:hover {
    text-decoration: underline;
}

.card-link svg {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.card-link:hover svg {
    transform: translateX(3px);
}

.card-date {
    height: 25px;
    color: #666;
    font-size: 0.95rem;
    overflow: hidden;
    /* 超出隐藏 */
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.footer-links a {
    color: #aaa;
    margin: 0 1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    color: #777;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}